<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NumCpp: BoostNumpyNdarrayHelper.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">NumCpp
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">A C++ implementation of the Python Numpy library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_boost_numpy_ndarray_helper_8hpp_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">BoostNumpyNdarrayHelper.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_boost_numpy_ndarray_helper_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#ifdef INCLUDE_BOOST_PYTHON_INTERFACE</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_stl_algorithms_8hpp.html">NumCpp/Core/StlAlgorithms.hpp</a>&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_types_8hpp.html">NumCpp/Core/Types.hpp</a>&quot;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="num2str_8hpp.html">NumCpp/Utils/num2str.hpp</a>&quot;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#include &quot;boost/python.hpp&quot;</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#include &quot;boost/python/numpy.hpp&quot;</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacenc.html">nc</a></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;{</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keyword">namespace </span>boostPythonInterface</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    {</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="comment">//================================================================================</span></div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html">   52</a></span>&#160;<span class="comment"></span>        <span class="keyword">class </span><a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html">BoostNdarrayHelper</a></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        {</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <span class="keyword">public</span>:</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;            <span class="comment">//================================================================================</span></div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311">   57</a></span>&#160;<span class="comment"></span>            <span class="keyword">enum class</span> <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311">Order</a> { <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311a800618943025315f869e4e1f09471012">F</a>, <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311a0d61f8370cad1d412f80b84d143e1257">C</a> };</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keyword">private</span>:</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;            <span class="comment">//====================================Attributes==============================</span></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;            boost::python::numpy::ndarray   theArray_;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;            <a class="code" href="namespacenc.html#a60efb2c7acad2ac3a9a9fcf1e93d0f49">uint8</a>                           numDimensions_;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;            std::vector&lt;Py_intptr_t&gt;        shape_;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;            std::vector&lt;uint32&gt;             strides_;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;            <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311">Order</a>                           order_;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="comment"></span>            <span class="keywordtype">void</span> checkIndicesGeneric(boost::python::tuple indices)</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;            {</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;                <span class="keywordflow">if</span> (boost::python::len(indices) != numDimensions_)</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;                {</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;                    std::string errStr = <span class="stringliteral">&quot;Error: BoostNdarrayHelper::checkIndicesGeneric: Array has &quot;</span> + <a class="code" href="namespacenc_1_1utils.html#a2e3a14fbbce38b0f8710ea0d92ee2ffc">utils::num2str</a>(numDimensions_);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;                    errStr += <span class="stringliteral">&quot; dimensions, you asked for &quot;</span> + <a class="code" href="namespacenc_1_1utils.html#a2e3a14fbbce38b0f8710ea0d92ee2ffc">utils::num2str</a>(static_cast&lt;int&gt;(boost::python::len(indices))) + <span class="stringliteral">&quot;!&quot;</span>;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                    PyErr_SetString(PyExc_RuntimeError, errStr.c_str());</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                }</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; numDimensions_; ++i)</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                {</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                    <span class="keywordtype">int</span> index = boost::python::extract&lt;int&gt;(indices[i]);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                    <span class="keywordflow">if</span> (index &gt; shape_[i])</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;                    {</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;                        std::string errStr = <span class="stringliteral">&quot;Error: BoostNdarrayHelper::checkIndicesGeneric: Input index [&quot;</span> + <a class="code" href="namespacenc_1_1utils.html#a2e3a14fbbce38b0f8710ea0d92ee2ffc">utils::num2str</a>(index);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                        errStr += <span class="stringliteral">&quot;] is larger than the size of the array [&quot;</span> + <a class="code" href="namespacenc_1_1utils.html#a2e3a14fbbce38b0f8710ea0d92ee2ffc">utils::num2str</a>(shape_[i]) + <span class="stringliteral">&quot;].&quot;</span>;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                        PyErr_SetString(PyExc_RuntimeError, errStr.c_str());</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                    }</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;                }</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;            }</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="comment"></span>            <span class="keywordtype">void</span> checkIndices1D(<a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> index)</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            {</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                boost::python::tuple indices = boost::python::make_tuple(index);</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;                checkIndicesGeneric(indices);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;            }</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="comment"></span>            <span class="keywordtype">void</span> checkIndices2D(<a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> index1, <a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> index2)</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;            {</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;                boost::python::tuple indices = boost::python::make_tuple(index1, index2);</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                checkIndicesGeneric(indices);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;            }</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="comment"></span>            <span class="keywordtype">void</span> checkIndices3D(<a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> index1, <a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> index2, <a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> index3)</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;            {</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                boost::python::tuple indices = boost::python::make_tuple(index1, index2, index3);</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                checkIndicesGeneric(indices);</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            }</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <span class="keyword">public</span>:</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a30364907e676e70f584cb7ccaa5ac547">  135</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a30364907e676e70f584cb7ccaa5ac547">BoostNdarrayHelper</a>(<span class="keyword">const</span> boost::python::numpy::ndarray&amp; inArray) :</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;                theArray_(inArray.<a class="code" href="namespacenc.html#aa67b4266cc44cb708b920746feb4eba7">astype</a>(boost::python::numpy::dtype::get_builtin&lt;double&gt;())),</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;                numDimensions_(static_cast&lt;<a class="code" href="namespacenc.html#a60efb2c7acad2ac3a9a9fcf1e93d0f49">uint8</a>&gt;(inArray.get_nd())),</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;                shape_(numDimensions_),</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;                strides_(numDimensions_),</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;                order_(<a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311">Order</a>::C)</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;            {</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;                Py_intptr_t <span class="keyword">const</span> * shapePtr = inArray.get_shape();</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;                <span class="keywordflow">for</span> (<a class="code" href="namespacenc.html#a60efb2c7acad2ac3a9a9fcf1e93d0f49">uint8</a> i = 0; i &lt; numDimensions_; ++i)</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                {</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;                    strides_[i] = <span class="keyword">static_cast&lt;</span><a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a><span class="keyword">&gt;</span>(theArray_.strides(i));</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;                    shape_[i] = shapePtr[i];</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;                }</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;                <span class="keywordflow">if</span> (numDimensions_ &gt; 1 &amp;&amp; inArray.strides(0) &lt; inArray.strides(1))</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;                {</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;                    order_ = <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311a800618943025315f869e4e1f09471012">Order::F</a>;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;                }</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;            }</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a961bbdf1557d85a48f1ae40d23ac37fa">  161</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a961bbdf1557d85a48f1ae40d23ac37fa">BoostNdarrayHelper</a>(boost::python::tuple inShape) :</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;                theArray_(boost::python::numpy::<a class="code" href="namespacenc.html#a003b8abd8ec4640d8fcbc6d2c4872baf">zeros</a>(inShape, boost::python::numpy::dtype::get_builtin&lt;double&gt;())),</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;                numDimensions_(static_cast&lt;<a class="code" href="namespacenc.html#a60efb2c7acad2ac3a9a9fcf1e93d0f49">uint8</a>&gt;(theArray_.get_nd())),</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;                shape_(numDimensions_),</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                strides_(numDimensions_),</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;                order_(<a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311">Order</a>::C)</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;            {</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;                Py_intptr_t <span class="keyword">const</span> * shapePtr = theArray_.get_shape();</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;                <span class="keywordflow">for</span> (<a class="code" href="namespacenc.html#a60efb2c7acad2ac3a9a9fcf1e93d0f49">uint8</a> i = 0; i &lt; numDimensions_; ++i)</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;                {</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;                    strides_[i] = <span class="keyword">static_cast&lt;</span><a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a><span class="keyword">&gt;</span>(theArray_.strides(i));</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;                    shape_[i] = shapePtr[i];</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;                }</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;                <span class="keywordflow">if</span> (numDimensions_ &gt; 1 &amp;&amp; theArray_.strides(0) &lt; theArray_.strides(1))</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;                {</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;                    order_ = <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311a800618943025315f869e4e1f09471012">Order::F</a>;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;                }</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            }</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00188"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#ad4ff3ef56ab470aca4ea2acc90824810">  188</a></span>&#160;<span class="comment"></span>            <span class="keyword">const</span> boost::python::numpy::ndarray&amp; <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#ad4ff3ef56ab470aca4ea2acc90824810">getArray</a>() noexcept</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;            {</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;                <span class="keywordflow">return</span> theArray_;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;            }</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a60dc597b784976e6241bf61686250d72">  198</a></span>&#160;<span class="comment"></span>            boost::python::numpy::matrix <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a60dc597b784976e6241bf61686250d72">getArrayAsMatrix</a>()</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;            {</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;                <span class="keywordflow">return</span> boost::python::numpy::matrix(theArray_);</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;            }</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aa16c4299e90c836df0f2397dc1c78b1a">  208</a></span>&#160;<span class="comment"></span>            <a class="code" href="namespacenc.html#a60efb2c7acad2ac3a9a9fcf1e93d0f49">uint8</a> <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aa16c4299e90c836df0f2397dc1c78b1a">numDimensions</a>() noexcept</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;            {</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;                <span class="keywordflow">return</span> numDimensions_;</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;            }</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a85eb7408eca779923d5f72bba5c15d94">  218</a></span>&#160;<span class="comment"></span>            <span class="keyword">const</span> std::vector&lt;Py_intptr_t&gt;&amp; <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a85eb7408eca779923d5f72bba5c15d94">shape</a>() noexcept</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;            {</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;                <span class="keywordflow">return</span> shape_;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;            }</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00228"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#ac00c6e4cf0c97c1720ae6439228202cb">  228</a></span>&#160;<span class="comment"></span>            <a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#ac00c6e4cf0c97c1720ae6439228202cb">size</a>()</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;            {</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;                <a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> theSize = 1;</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                <span class="keywordflow">for</span> (<span class="keyword">auto</span> dimSize : shape_)</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                {</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;                    theSize *= <span class="keyword">static_cast&lt;</span><a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a><span class="keyword">&gt;</span>(dimSize);</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;                }</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;                <span class="keywordflow">return</span> theSize;</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;            }</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a41b50017bc8bd0b71c662b598a0c86a7">  244</a></span>&#160;<span class="comment"></span>            <span class="keyword">const</span> std::vector&lt;uint32&gt;&amp; <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a41b50017bc8bd0b71c662b598a0c86a7">strides</a>() noexcept</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;            {</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;                <span class="keywordflow">return</span> strides_;</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;            }</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00254"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aa235602ad1f2455a86ab7a9944f70d2c">  254</a></span>&#160;<span class="comment"></span>            <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311">Order</a> <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aa235602ad1f2455a86ab7a9944f70d2c">order</a>() noexcept</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;            {</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;                <span class="keywordflow">return</span> order_;</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;            }</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00266"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#ab0e47d83edf0a6b6247b30e930e5e8e4">  266</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">bool</span> <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#ab0e47d83edf0a6b6247b30e930e5e8e4">shapeEqual</a>(<a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html">BoostNdarrayHelper</a>&amp; otherNdarrayHelper)</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;            {</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;                <span class="keywordflow">if</span> (shape_.size() != otherNdarrayHelper.shape_.size())</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;                {</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;                    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;                }</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;                <span class="keywordflow">return</span> <a class="code" href="namespacenc_1_1stl__algorithms.html#ab200b92040bf3da8ee4325f5a994e73d">stl_algorithms::equal</a>(shape_.begin(), shape_.end(), otherNdarrayHelper.shape_.begin());</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;            }</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00283"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#ac7d7771239aa10a8599a37b30a434eb1">  283</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">double</span>&amp; <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#ac7d7771239aa10a8599a37b30a434eb1">operator()</a>(<a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> index)</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;            {</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;                checkIndices1D(index);</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">double</span>*<span class="keyword">&gt;</span>(theArray_.get_data() + strides_.front() * index);</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;            }</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a666bb0d7ffa14bad410f0b1419c7ef9d">  298</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">double</span>&amp; <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a666bb0d7ffa14bad410f0b1419c7ef9d">operator()</a>(<a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> index1, <a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> index2)</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;            {</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;                checkIndices2D(index1, index2);</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">double</span>*<span class="keyword">&gt;</span>(theArray_.get_data() + strides_.front() * index1 + strides_[1] * index2);</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;            }</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aa595a1a42ed68d5b5701e31c087cff50">  313</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">double</span>&amp; <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aa595a1a42ed68d5b5701e31c087cff50">operator()</a>(<a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> index1, <a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> index2, <a class="code" href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">uint32</a> index3)</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;            {</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;                checkIndices3D(index1, index2, index3);</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;                <span class="keywordflow">return</span> *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">double</span>*<span class="keyword">&gt;</span>(theArray_.get_data() + strides_.front() * index1 + strides_[1] * index2 + strides_[2] * index3);</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;            }</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00323"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aec8b200d42f2235d8fa6789ce760cca4">  323</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">void</span> <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aec8b200d42f2235d8fa6789ce760cca4">printArray1D</a>()</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;            {</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;                printf(<span class="stringliteral">&quot;array = \n&quot;</span>);</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;                <span class="keywordflow">if</span> (numDimensions_ != 1)</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;                {</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;                    std::cout &lt;&lt; <span class="stringliteral">&quot;printArray1D can only be used on a 1D array.&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;                    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;                }</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;                <span class="keywordflow">for</span> (<a class="code" href="namespacenc.html#ae1001b41fda4e17eb2dd197b4bfa56df">int32</a> i = 0; i &lt; shape_.front(); ++i)</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;                {</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;                    printf(<span class="stringliteral">&quot;\t%f\n&quot;</span>, <span class="keyword">operator</span>()(i));</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;                }</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;            }</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00341"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#acb5f51b3307274d6092886b034816fcf">  341</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">void</span> <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#acb5f51b3307274d6092886b034816fcf">printArray2D</a>()</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;            {</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;                printf(<span class="stringliteral">&quot;array = \n&quot;</span>);</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;                <span class="keywordflow">if</span> (numDimensions_ != 2)</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;                {</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;                    std::cout &lt;&lt; <span class="stringliteral">&quot;printArray2D can only be used on a 2D array.&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;                    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;                }</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;                <span class="keywordflow">for</span> (<a class="code" href="namespacenc.html#ae1001b41fda4e17eb2dd197b4bfa56df">int32</a> index1 = 0; index1 &lt; shape_.front(); ++index1)</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;                {</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;                    <span class="keywordflow">for</span> (<a class="code" href="namespacenc.html#ae1001b41fda4e17eb2dd197b4bfa56df">int32</a> index2 = 0; index2 &lt; shape_.back(); ++index2)</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;                    {</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;                        printf(<span class="stringliteral">&quot;\t%f&quot;</span>, <span class="keyword">operator</span>()(index1, index2));</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;                    }</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;                    printf(<span class="stringliteral">&quot;\n&quot;</span>);</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;                }</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;            }</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;            <span class="comment">//============================================================================</span></div><div class="line"><a name="l00363"></a><span class="lineno"><a class="line" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aea83665f429e95b43612c0d08e61b556">  363</a></span>&#160;<span class="comment"></span>            <span class="keywordtype">void</span> <a class="code" href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aea83665f429e95b43612c0d08e61b556">printArray3D</a>()</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;            {</div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;                printf(<span class="stringliteral">&quot;array = \n&quot;</span>);</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;                <span class="keywordflow">if</span> (numDimensions_ != 3)</div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;                {</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;                    std::cout &lt;&lt; <span class="stringliteral">&quot;printArray3D can only be used on a 3D array.&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;                    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;                }</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;                <span class="keywordflow">for</span> (<a class="code" href="namespacenc.html#ae1001b41fda4e17eb2dd197b4bfa56df">int32</a> index1 = 0; index1 &lt; shape_.front(); ++index1)</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;                {</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;                    <span class="keywordflow">for</span> (<a class="code" href="namespacenc.html#ae1001b41fda4e17eb2dd197b4bfa56df">int32</a> index2 = 0; index2 &lt; shape_[1]; ++index2)</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;                    {</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;                        <span class="keywordflow">for</span> (<a class="code" href="namespacenc.html#ae1001b41fda4e17eb2dd197b4bfa56df">int32</a> index3 = 0; index3 &lt; shape_.back(); ++index3)</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;                        {</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;                            printf(<span class="stringliteral">&quot;\t%f&quot;</span>, <span class="keyword">operator</span>()(index1, index2, index3));</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;                        }</div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;                    }</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;                    printf(<span class="stringliteral">&quot;\n&quot;</span>);</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;                }</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;                printf(<span class="stringliteral">&quot;\n&quot;</span>);</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;            }</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;        };</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;    }</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;}</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_aea83665f429e95b43612c0d08e61b556"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aea83665f429e95b43612c0d08e61b556">nc::boostPythonInterface::BoostNdarrayHelper::printArray3D</a></div><div class="ttdeci">void printArray3D()</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:363</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_a30364907e676e70f584cb7ccaa5ac547"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a30364907e676e70f584cb7ccaa5ac547">nc::boostPythonInterface::BoostNdarrayHelper::BoostNdarrayHelper</a></div><div class="ttdeci">BoostNdarrayHelper(const boost::python::numpy::ndarray &amp;inArray)</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:135</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_a85eb7408eca779923d5f72bba5c15d94"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a85eb7408eca779923d5f72bba5c15d94">nc::boostPythonInterface::BoostNdarrayHelper::shape</a></div><div class="ttdeci">const std::vector&lt; Py_intptr_t &gt; &amp; shape() noexcept</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:218</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_ad4ff3ef56ab470aca4ea2acc90824810"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#ad4ff3ef56ab470aca4ea2acc90824810">nc::boostPythonInterface::BoostNdarrayHelper::getArray</a></div><div class="ttdeci">const boost::python::numpy::ndarray &amp; getArray() noexcept</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:188</div></div>
<div class="ttc" id="namespacenc_html"><div class="ttname"><a href="namespacenc.html">nc</a></div><div class="ttdef"><b>Definition:</b> Coordinate.hpp:45</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_a6f7c27e9f931e541dc034cd7fe9c3311"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311">nc::boostPythonInterface::BoostNdarrayHelper::Order</a></div><div class="ttdeci">Order</div><div class="ttdoc">C or Fortran ordering from python. </div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:57</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_ac00c6e4cf0c97c1720ae6439228202cb"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#ac00c6e4cf0c97c1720ae6439228202cb">nc::boostPythonInterface::BoostNdarrayHelper::size</a></div><div class="ttdeci">uint32 size()</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:228</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_a6f7c27e9f931e541dc034cd7fe9c3311a800618943025315f869e4e1f09471012"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311a800618943025315f869e4e1f09471012">nc::boostPythonInterface::BoostNdarrayHelper::Order::F</a></div></div>
<div class="ttc" id="namespacenc_html_aacba4d66f94f6f53637e23c5d82e20d8"><div class="ttname"><a href="namespacenc.html#aacba4d66f94f6f53637e23c5d82e20d8">nc::uint32</a></div><div class="ttdeci">uint32_t uint32</div><div class="ttdef"><b>Definition:</b> Types.hpp:41</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_a961bbdf1557d85a48f1ae40d23ac37fa"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a961bbdf1557d85a48f1ae40d23ac37fa">nc::boostPythonInterface::BoostNdarrayHelper::BoostNdarrayHelper</a></div><div class="ttdeci">BoostNdarrayHelper(boost::python::tuple inShape)</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:161</div></div>
<div class="ttc" id="namespacenc_1_1stl__algorithms_html_ab200b92040bf3da8ee4325f5a994e73d"><div class="ttname"><a href="namespacenc_1_1stl__algorithms.html#ab200b92040bf3da8ee4325f5a994e73d">nc::stl_algorithms::equal</a></div><div class="ttdeci">bool equal(InputIt1 first1, InputIt1 last1, InputIt2 first2) noexcept</div><div class="ttdef"><b>Definition:</b> StlAlgorithms.hpp:132</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_aec8b200d42f2235d8fa6789ce760cca4"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aec8b200d42f2235d8fa6789ce760cca4">nc::boostPythonInterface::BoostNdarrayHelper::printArray1D</a></div><div class="ttdeci">void printArray1D()</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:323</div></div>
<div class="ttc" id="namespacenc_html_ae1001b41fda4e17eb2dd197b4bfa56df"><div class="ttname"><a href="namespacenc.html#ae1001b41fda4e17eb2dd197b4bfa56df">nc::int32</a></div><div class="ttdeci">int32_t int32</div><div class="ttdef"><b>Definition:</b> Types.hpp:37</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_ac7d7771239aa10a8599a37b30a434eb1"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#ac7d7771239aa10a8599a37b30a434eb1">nc::boostPythonInterface::BoostNdarrayHelper::operator()</a></div><div class="ttdeci">double &amp; operator()(uint32 index)</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:283</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_a41b50017bc8bd0b71c662b598a0c86a7"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a41b50017bc8bd0b71c662b598a0c86a7">nc::boostPythonInterface::BoostNdarrayHelper::strides</a></div><div class="ttdeci">const std::vector&lt; uint32 &gt; &amp; strides() noexcept</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:244</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_acb5f51b3307274d6092886b034816fcf"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#acb5f51b3307274d6092886b034816fcf">nc::boostPythonInterface::BoostNdarrayHelper::printArray2D</a></div><div class="ttdeci">void printArray2D()</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:341</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_a60dc597b784976e6241bf61686250d72"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a60dc597b784976e6241bf61686250d72">nc::boostPythonInterface::BoostNdarrayHelper::getArrayAsMatrix</a></div><div class="ttdeci">boost::python::numpy::matrix getArrayAsMatrix()</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:198</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_a6f7c27e9f931e541dc034cd7fe9c3311a0d61f8370cad1d412f80b84d143e1257"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a6f7c27e9f931e541dc034cd7fe9c3311a0d61f8370cad1d412f80b84d143e1257">nc::boostPythonInterface::BoostNdarrayHelper::Order::C</a></div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_aa595a1a42ed68d5b5701e31c087cff50"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aa595a1a42ed68d5b5701e31c087cff50">nc::boostPythonInterface::BoostNdarrayHelper::operator()</a></div><div class="ttdeci">double &amp; operator()(uint32 index1, uint32 index2, uint32 index3)</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:313</div></div>
<div class="ttc" id="_stl_algorithms_8hpp_html"><div class="ttname"><a href="_stl_algorithms_8hpp.html">StlAlgorithms.hpp</a></div></div>
<div class="ttc" id="_types_8hpp_html"><div class="ttname"><a href="_types_8hpp.html">Types.hpp</a></div></div>
<div class="ttc" id="namespacenc_html_a60efb2c7acad2ac3a9a9fcf1e93d0f49"><div class="ttname"><a href="namespacenc.html#a60efb2c7acad2ac3a9a9fcf1e93d0f49">nc::uint8</a></div><div class="ttdeci">uint8_t uint8</div><div class="ttdef"><b>Definition:</b> Types.hpp:43</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_aa16c4299e90c836df0f2397dc1c78b1a"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aa16c4299e90c836df0f2397dc1c78b1a">nc::boostPythonInterface::BoostNdarrayHelper::numDimensions</a></div><div class="ttdeci">uint8 numDimensions() noexcept</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:208</div></div>
<div class="ttc" id="namespacenc_html_a003b8abd8ec4640d8fcbc6d2c4872baf"><div class="ttname"><a href="namespacenc.html#a003b8abd8ec4640d8fcbc6d2c4872baf">nc::zeros</a></div><div class="ttdeci">NdArray&lt; dtype &gt; zeros(uint32 inSquareSize) noexcept</div><div class="ttdef"><b>Definition:</b> zeros.hpp:50</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_aa235602ad1f2455a86ab7a9944f70d2c"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#aa235602ad1f2455a86ab7a9944f70d2c">nc::boostPythonInterface::BoostNdarrayHelper::order</a></div><div class="ttdeci">Order order() noexcept</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:254</div></div>
<div class="ttc" id="num2str_8hpp_html"><div class="ttname"><a href="num2str_8hpp.html">num2str.hpp</a></div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_a666bb0d7ffa14bad410f0b1419c7ef9d"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#a666bb0d7ffa14bad410f0b1419c7ef9d">nc::boostPythonInterface::BoostNdarrayHelper::operator()</a></div><div class="ttdeci">double &amp; operator()(uint32 index1, uint32 index2)</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:298</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html_ab0e47d83edf0a6b6247b30e930e5e8e4"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html#ab0e47d83edf0a6b6247b30e930e5e8e4">nc::boostPythonInterface::BoostNdarrayHelper::shapeEqual</a></div><div class="ttdeci">bool shapeEqual(BoostNdarrayHelper &amp;otherNdarrayHelper)</div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:266</div></div>
<div class="ttc" id="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper_html"><div class="ttname"><a href="classnc_1_1boost_python_interface_1_1_boost_ndarray_helper.html">nc::boostPythonInterface::BoostNdarrayHelper</a></div><div class="ttdoc">Helper class for ndarray. </div><div class="ttdef"><b>Definition:</b> BoostNumpyNdarrayHelper.hpp:52</div></div>
<div class="ttc" id="namespacenc_html_aa67b4266cc44cb708b920746feb4eba7"><div class="ttname"><a href="namespacenc.html#aa67b4266cc44cb708b920746feb4eba7">nc::astype</a></div><div class="ttdeci">NdArray&lt; dtypeOut &gt; astype(const NdArray&lt; dtype &gt; inArray) noexcept</div><div class="ttdef"><b>Definition:</b> astype.hpp:45</div></div>
<div class="ttc" id="namespacenc_1_1utils_html_a2e3a14fbbce38b0f8710ea0d92ee2ffc"><div class="ttname"><a href="namespacenc_1_1utils.html#a2e3a14fbbce38b0f8710ea0d92ee2ffc">nc::utils::num2str</a></div><div class="ttdeci">std::string num2str(dtype inNumber) noexcept</div><div class="ttdef"><b>Definition:</b> num2str.hpp:45</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_34171bd951b13a53aa9f237277a18e40.html">NumCpp</a></li><li class="navelem"><a class="el" href="dir_5de075070a423c280ad6ed943802bf75.html">PythonInterface</a></li><li class="navelem"><a class="el" href="_boost_numpy_ndarray_helper_8hpp.html">BoostNumpyNdarrayHelper.hpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
